from http.client import responses

from Day16rk.toolls import get_verification_code
import requests

def test_login():

    rand_code, jsession_id = get_verification_code()

    url="http://10.59.9.32/jeewms/loginController.do?checkuser"

    headers={
        "content-type":"application/x-www-form-urlencoded",
        "Cookie":f"JSESSIONID={jsession_id}"
    }
    data={
        "userName":"admin",
        "password":"llg123",
        "randCode":f"{rand_code}",
        "langCode": "zh-cn",

    }
    response=requests.post(url=url,headers=headers,data=data)
    print(response.json())



